<!doctype html>
<html>
<head>
<meta name="Generator"  />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>在线反馈</title>
<meta name="Keywords" content="Call管家" />
<meta name="Description" content="Call管家" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>

<link rel="stylesheet" href="__HOMECSS__/style.css">
<link rel="stylesheet" type="text/css" href="__HOMECSS__/mobileSelect.css">
<script src="__HOMEJS__/mobileSelect.js" type="text/javascript"></script>

</head>

<body>

<ul class="coupon_top myorder_top">
    <li><span class="coupon_topthis" data-key="11">常见问题</span></li>
    <li><span data-key="12">客服联系方式</span></li>
    <li><span data-key="13">发票管理</span></li>
    <li><span data-key="lyb">留言版</span></li>

</ul>
<ul class="myorder_all">
    <li id='wz'>
        
    </li>
    <li style="display: none;" id='lyb'>
        <div class="order_list"></div>
            <div class="message">
                <textarea placeholder="来说说您的想法吧~" name='comment' id='comment'></textarea>
            </div>
        <div class="address_new" onclick="ajax_comment()">
                <p>提交</p>
            </div>
    </li>

</ul>



</body>
<script src="__HOMEJS__/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__HOMEJS__/mobileSelect.js" type="text/javascript"></script>
<script>
    $(function(){
      ajax_order_list(11);
    })
    $(function () {
        $(".coupon_top li").click(function () {
            $(".coupon_top li").find("span").removeClass('coupon_topthis')
            $(this).find("span").addClass('coupon_topthis')
             if($(this).find("span").data('key')!="lyb"){
                $('#wz').show();
                $('#lyb').hide();
                ajax_order_list($(this).find("span").data('key'));
            }else{
                $('#wz').hide();
                $('#lyb').show();
            }
        })
        var index = 0;
       $("#wz").find(".feedbackone").live('click',function(){
           var indexs = $(this).index();
            $('.feebbackhide').hide();
            if(index==indexs){
                index = 0;
            }else{
                $(this).find(".feebbackhide").show();
                index = indexs;
            }
           
            
        })


    })
    function ajax_order_list(id){
    	var index = layer.load();
    	$.ajax({
    		type:"post",
    		url:"{:Url('Notice/ajax_feedback')}",
    		dataType:'json',
    		data:{id:id},
    		success:function(res){
    			layer.close(index);
    			if(res.status==1){
    				$('#wz').html(res.info);
    			}
    		}
    	});
    }
    
     function ajax_comment(){
    	var comment = $('#comment').val();
        if(comment==""){
             layer.msg("评论内容不允许为空！",{icon:2,time:1500});
             return false;
        }
    	$.ajax({
    		type:"post",
    		url:"{:Url('Notice/feedback_comment')}",
    		dataType:'json',
    		data:{comment:comment},
    		success:function(res){
    			if(res.status==1){
    			    layer.msg(res.info,{icon:1,time:1500});
                    window.location.reload();
    			}else{
                    layer.msg(res.info,{icon:2,time:1500});
                }
    		}
    	});
    }
</script>
</html>
